<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::ndt2d::NDTSingleGrid&lt; PointT &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1ndt2d_1_1_n_d_t_single_grid.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="#pri-types">Private 类型</a> &#124;
<a href="classpcl_1_1ndt2d_1_1_n_d_t_single_grid-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::ndt2d::NDTSingleGrid&lt; PointT &gt; 模板类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>Build a set of normal distributions modelling a 2D point cloud, and provide the value and derivatives of the model at any point via the test (...) function.  
 <a href="classpcl_1_1ndt2d_1_1_n_d_t_single_grid.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="ndt__2d_8hpp_source.html">ndt_2d.hpp</a>&gt;</code></p>
<div class="dynheader">
类 pcl::ndt2d::NDTSingleGrid&lt; PointT &gt; 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classpcl_1_1ndt2d_1_1_n_d_t_single_grid.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a70b3972682aae5b0d27f9d49b9d7a7da"><td class="memItemLeft" align="right" valign="top"><a id="a70b3972682aae5b0d27f9d49b9d7a7da"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>NDTSingleGrid</b> (PointCloudConstPtr cloud, const Eigen::Vector2f &amp;about, const Eigen::Vector2f &amp;extent, const Eigen::Vector2f &amp;step)</td></tr>
<tr class="separator:a70b3972682aae5b0d27f9d49b9d7a7da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af77c36218ee572918dcef6435e6650a8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structpcl_1_1ndt2d_1_1_value_and_derivatives.html">ValueAndDerivatives</a>&lt; 3, double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1ndt2d_1_1_n_d_t_single_grid.html#af77c36218ee572918dcef6435e6650a8">test</a> (const <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;transformed_pt, const double &amp;cos_theta, const double &amp;sin_theta) const</td></tr>
<tr class="memdesc:af77c36218ee572918dcef6435e6650a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the 'score' (denormalised likelihood) and derivatives of score of the point p given this distribution.  <a href="classpcl_1_1ndt2d_1_1_n_d_t_single_grid.html#af77c36218ee572918dcef6435e6650a8">更多...</a><br /></td></tr>
<tr class="separator:af77c36218ee572918dcef6435e6650a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:a097042ef93cf30db0cc0002ad80312b5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpcl_1_1ndt2d_1_1_normal_dist.html">NormalDist</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1ndt2d_1_1_n_d_t_single_grid.html#a097042ef93cf30db0cc0002ad80312b5">normalDistForPoint</a> (<a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> const &amp;p) const</td></tr>
<tr class="memdesc:a097042ef93cf30db0cc0002ad80312b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the normal distribution covering the location of point p  <a href="classpcl_1_1ndt2d_1_1_n_d_t_single_grid.html#a097042ef93cf30db0cc0002ad80312b5">更多...</a><br /></td></tr>
<tr class="separator:a097042ef93cf30db0cc0002ad80312b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:a13a4357418d0371424e6be19aebab8e5"><td class="memItemLeft" align="right" valign="top"><a id="a13a4357418d0371424e6be19aebab8e5"></a>
Eigen::Vector2f&#160;</td><td class="memItemRight" valign="bottom"><b>min_</b></td></tr>
<tr class="separator:a13a4357418d0371424e6be19aebab8e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51172edde583e9a0396b4494ea4ce83e"><td class="memItemLeft" align="right" valign="top"><a id="a51172edde583e9a0396b4494ea4ce83e"></a>
Eigen::Vector2f&#160;</td><td class="memItemRight" valign="bottom"><b>max_</b></td></tr>
<tr class="separator:a51172edde583e9a0396b4494ea4ce83e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4d1147ca68f2150c43bf09d9ed36234"><td class="memItemLeft" align="right" valign="top"><a id="ad4d1147ca68f2150c43bf09d9ed36234"></a>
Eigen::Vector2f&#160;</td><td class="memItemRight" valign="bottom"><b>step_</b></td></tr>
<tr class="separator:ad4d1147ca68f2150c43bf09d9ed36234"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acad2b115741f70ddd7b682ebcd7b7245"><td class="memItemLeft" align="right" valign="top"><a id="acad2b115741f70ddd7b682ebcd7b7245"></a>
Eigen::Vector2i&#160;</td><td class="memItemRight" valign="bottom"><b>cells_</b></td></tr>
<tr class="separator:acad2b115741f70ddd7b682ebcd7b7245"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa72cfc0c518ac56a70bca7c3cc642f21"><td class="memItemLeft" align="right" valign="top"><a id="aa72cfc0c518ac56a70bca7c3cc642f21"></a>
Eigen::Matrix&lt; <a class="el" href="classpcl_1_1ndt2d_1_1_normal_dist.html">NormalDist</a>, Eigen::Dynamic, Eigen::Dynamic &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>normal_distributions_</b></td></tr>
<tr class="separator:aa72cfc0c518ac56a70bca7c3cc642f21"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-types"></a>
Private 类型</h2></td></tr>
<tr class="memitem:a677ef3984f4b689f1ac9c09ccd0eeee1"><td class="memItemLeft" align="right" valign="top"><a id="a677ef3984f4b689f1ac9c09ccd0eeee1"></a>
typedef <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloud</b></td></tr>
<tr class="separator:a677ef3984f4b689f1ac9c09ccd0eeee1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7f10f3dddd53f935a5360d0c58d434c"><td class="memItemLeft" align="right" valign="top"><a id="ae7f10f3dddd53f935a5360d0c58d434c"></a>
typedef <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::ConstPtr&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloudConstPtr</b></td></tr>
<tr class="separator:ae7f10f3dddd53f935a5360d0c58d434c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28f8725dafa51f1feab2102f58dbf016"><td class="memItemLeft" align="right" valign="top"><a id="a28f8725dafa51f1feab2102f58dbf016"></a>
typedef <a class="el" href="classpcl_1_1ndt2d_1_1_normal_dist.html">pcl::ndt2d::NormalDist</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>NormalDist</b></td></tr>
<tr class="separator:a28f8725dafa51f1feab2102f58dbf016"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><h3>template&lt;typename PointT&gt;<br />
class pcl::ndt2d::NDTSingleGrid&lt; PointT &gt;</h3>

<p>Build a set of normal distributions modelling a 2D point cloud, and provide the value and derivatives of the model at any point via the test (...) function. </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a097042ef93cf30db0cc0002ad80312b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a097042ef93cf30db0cc0002ad80312b5">&#9670;&nbsp;</a></span>normalDistForPoint()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classpcl_1_1ndt2d_1_1_normal_dist.html">NormalDist</a>* <a class="el" href="classpcl_1_1ndt2d_1_1_n_d_t_single_grid.html">pcl::ndt2d::NDTSingleGrid</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::normalDistForPoint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> const &amp;&#160;</td>
          <td class="paramname"><em>p</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the normal distribution covering the location of point p </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p</td><td>a point </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        {</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;          <span class="comment">// this would be neater in 3d...</span></div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;          Eigen::Vector2f idxf;</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;          <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; 2; i++)</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;            idxf[i] = (p.getVector3fMap ()[i] - min_[i]) / step_[i];</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;          Eigen::Vector2i idxi = idxf.cast&lt;<span class="keywordtype">int</span>&gt; ();</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;          <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; 2; i++)</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;            <span class="keywordflow">if</span> (idxi[i] &gt;= cells_[i] || idxi[i] &lt; 0)</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;              <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;          <span class="comment">// const cast to avoid duplicating this function in const and</span></div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;          <span class="comment">// non-const variants...</span></div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;          <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span>NormalDist*<span class="keyword">&gt;</span> (&amp;normal_distributions_.coeffRef (idxi[0], idxi[1]));</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;        }</div>
</div><!-- fragment -->
</div>
</div>
<a id="af77c36218ee572918dcef6435e6650a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af77c36218ee572918dcef6435e6650a8">&#9670;&nbsp;</a></span>test()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structpcl_1_1ndt2d_1_1_value_and_derivatives.html">ValueAndDerivatives</a>&lt;3,double&gt; <a class="el" href="classpcl_1_1ndt2d_1_1_n_d_t_single_grid.html">pcl::ndt2d::NDTSingleGrid</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::test </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;&#160;</td>
          <td class="paramname"><em>transformed_pt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double &amp;&#160;</td>
          <td class="paramname"><em>cos_theta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double &amp;&#160;</td>
          <td class="paramname"><em>sin_theta</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the 'score' (denormalised likelihood) and derivatives of score of the point p given this distribution. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">transformed_pt</td><td>Location to evaluate at. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cos_theta</td><td>sin(theta) of the current rotation angle of rigid transformation: to avoid repeated evaluation </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">sin_theta</td><td>cos(theta) of the current rotation angle of rigid transformation: to avoid repeated evaluation </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;        {</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;          <span class="keyword">const</span> NormalDist* n = <a class="code" href="classpcl_1_1ndt2d_1_1_n_d_t_single_grid.html#a097042ef93cf30db0cc0002ad80312b5">normalDistForPoint</a> (transformed_pt);</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;          <span class="comment">// index is in grid, return score from the normal distribution from</span></div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;          <span class="comment">// the correct part of the grid:</span></div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;          <span class="keywordflow">if</span> (n)</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;            <span class="keywordflow">return</span> n-&gt;test (transformed_pt, cos_theta, sin_theta);</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;          <span class="keywordflow">else</span></div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;            <span class="keywordflow">return</span> ValueAndDerivatives&lt;3,double&gt;::Zero ();</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;        }</div>
<div class="ttc" id="aclasspcl_1_1ndt2d_1_1_n_d_t_single_grid_html_a097042ef93cf30db0cc0002ad80312b5"><div class="ttname"><a href="classpcl_1_1ndt2d_1_1_n_d_t_single_grid.html#a097042ef93cf30db0cc0002ad80312b5">pcl::ndt2d::NDTSingleGrid::normalDistForPoint</a></div><div class="ttdeci">NormalDist * normalDistForPoint(PointT const &amp;p) const</div><div class="ttdoc">Return the normal distribution covering the location of point p</div><div class="ttdef"><b>Definition:</b> ndt_2d.hpp:275</div></div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>registration/include/pcl/registration/impl/<a class="el" href="ndt__2d_8hpp_source.html">ndt_2d.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><b>ndt2d</b></li><li class="navelem"><a class="el" href="classpcl_1_1ndt2d_1_1_n_d_t_single_grid.html">NDTSingleGrid</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
